/**
 *  仅创建一个GL窗口程序。
 */


#define GLFW_INCLUDE_VULKAN     // 定义后，glfw3集成包含vulkan sdk函数头文件：vulkan/vulkan.h
#include <GLFW/glfw3.h>

#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/vec4.hpp>
#include <glm/mat4x4.hpp>

#include <iostream>

int main(int argc, char **argv)
{
    // 初始化glfw
    glfwInit();
    
    glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);

    // 创建窗口
    GLFWwindow * window = glfwCreateWindow(800, 600, "Vulkan Window", nullptr, nullptr);

    // 获取支持的扩展数，需要先定义宏GLFW_INCLUDE_VULKAN，vkEnumerateInstanceExtensionProperties才可用
    uint32_t extensionCount = 0;
    vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr);  // 
    std::cout << extensionCount << " extensions supported\n";

    // 测试矩阵计算
    glm::vec4 vec;
    glm::mat4 mat;
    auto test = mat * vec;

    while ( !glfwWindowShouldClose(window)) {
        glfwPollEvents();
    }
    
    // 关闭窗口，并释放glfw
    glfwDestroyWindow(window);
    glfwTerminate();
    return 0;
}
